// EG4DCSD.hh -- a brief definition of the class for Sensitive Detectors of DCs
// Created: Jan. 22, 2019, by Asia SUN, asia.rabbit@163.com
// Last Modified: Jan. 22, 2019 by Asia SUN

#ifndef EG4DCSD_h
#define EG4DCSD_h

#include "G4VSensitiveDetector.hh"
#include "G4THitsCollection.hh"
#include "EG4DCHit.h"

using EG4DCHC = G4THitsCollection<EG4DCHit>;

class EG4DCSD : public G4VSensitiveDetector{
public:
  EG4DCSD(string name);
  virtual ~EG4DCSD();

  // invoked at the beginning of each event
  virtual void Initialize(G4HCofThisEvent *hce);
  // query step info from G4Step
  virtual bool ProcessHits(G4Step *step, G4TouchableHistory *);

protected:
  // internally this is a vector
  static const int kNHC = 2;
  EG4DCHC *fHC[kNHC]; // [0-primaries--1-secondaries]
  int fHCID[kNHC];
};

#endif
